/*
 * Player.java
 * 
 * Created on 2008-04-18, 01:06:04
 */

package planesimulator.game;

import com.jme.math.Vector3f;
import planesimulator.plane.AbstractPlane;

/**
 * Class which represents player.
 *
 * @author Mateusz 'm4linka' Malinowski (m4linka@gmail.com)
 */
public class Player  {

  /** The plane */
  private AbstractPlane plane;
  
  /**
   * Get player's plane.
   * 
   * @return player's plane
   */
  public AbstractPlane getPlane() {
    return plane;
  }

  
  /** 
   * Set player's plane.
   * 
   * @param plane
   */
  public void setPlane(final AbstractPlane plane) {
    this.plane = plane;
  }
  
  /**
   * @return player's vector translation (player's position)
   */
  public Vector3f getLocation() {
    return plane.getLocalTranslation();
  }
  
  
  /**
   * 
   * @return engine's power
   */
  public float getEnginePower() {
    return plane.engine_power;
  }
  
  
  /**
   * Updates player's position.
   * 
   * @param time
   */
  public void update(final float time) {
    plane.update(time);
  }
  
}
